class Animal:
    """单例模式"""
    __ORE = 'Animal __ore'
    ORE = 'Animal ore'
    def __init__(self):
        self.a = 2
        self.b = 3

    @classmethod
    def getore(cls):
        # 私有属性cls.__ORE 会被 解释为_Animal__ORE
        print(f'class: {cls.__name__} \t classORE：{cls.__ORE}')

class Pig(Animal):
    __ORE = 'Pig ore'


    @classmethod
    def getore(cls):
        # 只展示现在自己类内部定义的属性，不会展现父类属性
        print(f'class: {cls.__name__}\tclassORE：{cls.__ORE}')
    def say(self):
        print(111)
a = Animal()
p = Pig()
# p.getore()
# print(p.ORE)
# print(dir(Pig))
# cls.__dict__ 用于存放类的静态函数，类函数，变通函数，全局变量以及一些内置属性,实例.__dict__,存放实例变量self.xxx
print(a.__dict__)
print(p.__dict__)
print(Animal.__dict__)
print(Pig.__dict__)
# print(Animal.__dict__)